﻿<%@ Page Language="C#" Inherits="E.Web.Teacher.courseware.Edit" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" >
<head>
  <title>课件信息</title>
  <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />  
  <link rel="stylesheet" href="/css/main.css" type="text/css" media="all" />
  <link rel="stylesheet" href="/css/t_main.css" type="text/css" media="all" />
  <script type="text/javascript" src="/js/courseware.js"></script>
  <script type="text/javascript" src="/js/jquery-1.4.2.min.js"></script>
  <script type="text/javascript" src="/js/Common.js"></script>
  <script type="text/javascript">
    function Href(p1, p2, p3) {
        window.location.replace(escape("/courseware/tmp.aspx?t=err&serverPath=escape" + p1 + "&picFilePath=" + p2 + "&picFilePath=" + p3));
    }
  </script>
</head>
<body>
  <form id="form1" method="post" action="" enctype="multipart/form-data" >
    <div class="m_top"></div>
    <div class="block_2">
      <div style="width:650px; height:22px;">
        <div class="title">&nbsp;课件信息</div>
      </div>
      <div class="spe_line_2"></div>
      <div class="box_1">
        <div class="fl tr left"><span class="hint">*</span>课程选择：</div>
        <div class="fl dis_r">
          <% if (courseList != null && courseList.Count > 0) { %>
          <select id="CourseSlt" name="CourseSlt">
            <option value="-1">请选择</option>
            <% foreach (System.Collections.Generic.KeyValuePair<int, string> kvp in courseList) { %>
              <option value="<%=kvp.Key %>"><%=kvp.Value%></option>
            <% } %>
          </select>
          <% } %>
        </div>
      </div>
      <div class="box_1">
        <div class="fl tr left"><span class="hint">*</span>总页数：</div>
        <div class="fl dis_r"><input type="text" id="SerialNumberTxt" name="SerialNumberTxt" value="<%=model.SerialNumber %>" readonly="readonly" /><input type="hidden" id="OriginalSerialNumberTxt" name="OriginalSerialNumberTxt" value="<%=model.SerialNumber %>" /></div>
      </div>
      <div class="box_1">
        <div class="fl tr left">课件备注：</div>
        <div class="fl"><textarea rows="*" cols="*" id="ContentTxt" name="ContentTxt" style="width:400px; height:100px;"><%=model.Content %></textarea></div>
      </div>
      <div class="box_1">
        <div class="fl tr left">文档：</div>
        <div id="pptdiv" class="fl">
            <% if (model.ImgUrl != null) { %>
            <span><%=model.ImgName %></span>
            &nbsp;&nbsp;<a href="javascript:editPPT();" >编辑</a>
            <% } %>
        </div>
        <div class="fl">
            <input type="file" id="PicFileUpload" name="PicFileUpload" style="width:360px; height:18px;" />
            <% if (act == "u") { %>&nbsp;&nbsp;<a id="pptbackdiv" href="javascript:cancelPPT();" >取消</a><% } %>
        </div>
      </div>
      <div class="box_1">
        <div class="fl tr left">声音：</div>
        <div id="sounddiv" class="fl">
            <% if (model.SoundUrl != null) { %>
            <span><%=model.SoundName %></span>
            &nbsp;&nbsp;<a href="javascript:editSound();" >编辑</a>
            <% } %>
        </div>
        <div class="fl">
            <input type="file" id="SoundFileUpload" name="SoundFileUpload" style="width:360px; height:18px;" />
            <% if (act == "u") { %>&nbsp;&nbsp;<a id="soundbackdiv" href="javascript:cancelSound();" >取消</a><% } %>
        </div>
      </div>
      <div class="box_1">
        <div class="fl tr left">视频：</div>
        <div id="videodiv" class="fl">
            <% if (model.VideoUrl != null) { %>
            <span><%=model.VideoName %></span>
            &nbsp;&nbsp;<a href="javascript:editVideo();" >编辑</a>
            <% } %>
        </div>
        <div class="fl">
            <input type="file" id="VideoFileUpload"  name="VideoFileUpload" style="width:360px; height:18px;" />
            <% if (act == "u") { %>&nbsp;&nbsp;<a id="videobackdiv" href="javascript:cancelVideo();" >取消</a><% } %>
        </div>
      </div>
    </div>
    <div class="block">
      <div style="width:350px; margin-top:20px; text-align:center;">
        <input type="image" src="/images/btn/confirm.gif" style="width:52px; height:22px;" onclick="return CheckForm();" />
        <% if (act == "u") { %>
        &nbsp;&nbsp;<a href="/courseware/List.aspx"><img alt="" src="/images/btn/back.gif" /></a>
        <% } %>
      </div>
    </div>
    <input type="hidden" id="act" name="act" value="<%=act %>" />
    <input type="hidden" id="id" name="id" value="<%=id %>" />
    <input type="hidden" id="cid" name="cid" value="<%=r_courseid %>" />
    <input type="hidden" id="se" name="se" value="<%=se %>" />
    <input type="hidden" id="o_p_p" name="o_p_p" value="<%=model.ImgUrl %>" />
    <input type="hidden" id="o_s_p" name="o_s_p" value="<%=model.SoundUrl %>" />
    <input type="hidden" id="o_v_p" name="o_v_p" value="<%=model.VideoUrl %>" />
    <input type="hidden" id="o_p_n" name="o_p_n" value="<%=model.ImgName %>" />
    <input type="hidden" id="o_s_n" name="o_s_n" value="<%=model.SoundName %>" />
    <input type="hidden" id="o_v_n" name="o_v_n" value="<%=model.VideoName %>" />
    <input type="hidden" id="p_update" name="p_update" value="f" />
    <input type="hidden" id="s_update" name="s_update" value="f" />
    <input type="hidden" id="v_update" name="v_update" value="f" />
    <% if (act == "n") { %>
    <script type="text/javascript">
        document.getElementById("CourseSlt").value = '<%=r_courseid %>';
        document.getElementById("SerialNumberTxt").value = '<%=se %>';
        document.getElementById("p_update").value = "t";
        document.getElementById("s_update").value = "t";
        document.getElementById("v_update").value = "t";
    </script>
    <% } else { %>
    <script type="text/javascript">
        document.getElementById("CourseSlt").value = '<%=model.CourseID %>';
        document.getElementById("PicFileUpload").style.display = "none";
        document.getElementById("pptbackdiv").style.display = "none";
        document.getElementById("SoundFileUpload").style.display = "none";
        document.getElementById("soundbackdiv").style.display = "none";
        document.getElementById("VideoFileUpload").style.display = "none";
        document.getElementById("videobackdiv").style.display = "none";
    </script>
    <% } %>


  </form>
</body>
</html>
